package com.itheima.reggie.common;

/**
 * @author 刘付磊
 * @date 2021/10/17 0017
 */

public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    /**
     * 设置值
     * @param id
     */
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId() {
        /**
         * 获取值
         * @return
         */
        return threadLocal.get();
    }
}
